/**
 * <b>项目名：</b>hclv-web<br/>  
 * <b>包名：</b>com.flea.hclv.model.entity.vo<br/>  
 * <b>文件名：</b>ProductTripVo.java<br/>  
 * <b>版本信息：</b>1.0<br/>  
 * <b>日期：</b>2018年11月6日 下午10:51:24<br/>  
 * <b>COPYRIGHT 2010-2012 ALL RIGHTS RESERVED 虫子科技</b>-版权所有<br/>
 */
package com.flea.hclv.model.entity.vo;

import com.flea.hclv.model.entity.HResourceRelation;
import com.flea.hclv.model.entity.HTrip;

/**
 * @description 行程vo
 * @createTime 2018年11月6日 下午10:51:24
 * @modifyTime
 * @author myflea@163.com
 * @version 1.0
 */
public class ProductTripVo {
	private Vehicle vehicle;
	private TripImage image;
	
	private String productId;

	private Integer sort;

	private Meal meal;
	


	private String describe;
	private String stayDescribe;
	private String isAbroad;
	private String customTrip;

  public String getProductId() {
    return productId;
  }

  public void setProductId(String productId) {
    this.productId = productId;
  }

  public String getCustomTrip() {
    return customTrip;
  }

  public void setCustomTrip(String customTrip) {
    this.customTrip = customTrip;
  }

  public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public Vehicle getVehicle() {
		return vehicle;
	}

	public void setVehicle(Vehicle vehicle) {
		this.vehicle = vehicle;
	}

	public TripImage getImage() {
		return image;
	}

	public void setImage(TripImage image) {
		this.image = image;
	}

	public Meal getMeal() {
		return meal;
	}

	public void setMeal(Meal meal) {
		this.meal = meal;
	}

	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	public String getStayDescribe() {
		return stayDescribe;
	}

	public void setStayDescribe(String stayDescribe) {
		this.stayDescribe = stayDescribe;
	}

	

	public String getIsAbroad() {
		return isAbroad;
	}

	public void setIsAbroad(String isAbroad) {
		this.isAbroad = isAbroad;
	}



	class Vehicle {
		private boolean bus;
		private boolean train;
		private boolean ship;
		private boolean subway;
		private boolean hsubway;
		private boolean plane;


		public boolean isBus() {
			return bus;
		}

		public void setBus(boolean bus) {
			this.bus = bus;
		}

		public boolean isTrain() {
			return train;
		}

		public void setTrain(boolean train) {
			this.train = train;
		}

		public boolean isShip() {
			return ship;
		}

		public void setShip(boolean ship) {
			this.ship = ship;
		}

		public boolean isSubway() {
			return subway;
		}

		public void setSubway(boolean subway) {
			this.subway = subway;
		}

		public boolean isHsubway() {
			return hsubway;
		}

		public void setHsubway(boolean hsubway) {
			this.hsubway = hsubway;
		}

		public boolean isPlane() {
			return plane;
		}

		public void setPlane(boolean plane) {
			this.plane = plane;
		}

	}

	class TripImage {
		private String relationId;
		private String resouceId;
		private String path;

    public String getResouceId() {
      return resouceId;
    }

    public void setResouceId(String resouceId) {
      this.resouceId = resouceId;
    }

    public String getPath() {
			return path;
		}

		public void setPath(String path) {
			this.path = path;
		}

		public String getRelationId() {
			return relationId;
		}

		public void setRelationId(String relationId) {
			this.relationId = relationId;
		}

	}

	public HTrip getHTrip() {

		String id = null ;

		String code = null ;



		

		String bus = null;

		String train = null;

		String ship = null;

		String subway = null;

		String hsubway = null;

		String plane = null;

		String breakfast = null;

		String lunch = null;

		String dinner = null;

		String nothing = null;
		String status = null;
		String aircraft = null;

		/*
		 * String createUser = null;
		 * 
		 * Date createTime = null;
		 * 
		 * String modifyUser = null;
		 * 
		 * Date modifyTime = null;
		 * 
		 * String valid = "Y";
		 */



		if (this.vehicle != null) {
			if (vehicle.isBus()) {
				bus = "Y";
			} else {
				bus = "N";
			}
			if (vehicle.isTrain()) {
				train = "Y";
			} else {
				train = "N";
			}
			if (vehicle.isSubway()) {
				subway = "Y";
			} else {
				subway = "N";
			}
			if (vehicle.isHsubway()) {
				hsubway = "Y";
			} else {
				hsubway = "N";
			}
			if (vehicle.isPlane()) {
				plane = "Y";
			} else {
				plane = "N";
			}
			if(vehicle.isShip()){
        ship="Y";
      }else{
        ship="N";
      }
			

		}
		if (this.meal != null) {
			if (meal.isBreakfast()) {
				breakfast = "Y";
			} else {
				breakfast = "N";
			}
			if (meal.isLunch()) {
				lunch = "Y";
			} else {
				lunch = "N";
			}
			if (meal.isDinner()) {
				dinner = "Y";
			} else {
				dinner = "N";
			}
			if (meal.isNothing()) {
				nothing = "Y";
			} else {
				nothing = "N";
			}
			if (meal.isAircraft()) {
				aircraft = "Y";
			} else {
        aircraft = "N";
			}

		}

		HTrip tripEntity = new HTrip();
		tripEntity.setBreakfast(breakfast);
		tripEntity.setBus(bus);
		tripEntity.setCode(code);
		tripEntity.setDescription(this.describe);
		tripEntity.setDinner(dinner);
		tripEntity.setHsubway(hsubway);
		tripEntity.setId(id);
		tripEntity.setTrain(train);
		tripEntity.setSubway(hsubway);
		tripEntity.setStayDescribe(this.stayDescribe);
		tripEntity.setStatus(status);
		tripEntity.setSort(this.sort);
		tripEntity.setProductId(this.productId);
		tripEntity.setPlane(plane);
		tripEntity.setIsAbroad(this.isAbroad);
		tripEntity.setLunch(lunch);
		tripEntity.setShip(ship);
		tripEntity.setNothing(nothing);
		tripEntity.setAircraft(aircraft);
		tripEntity.setCustomTrip(this.customTrip);

		tripEntity.setSubway(subway);


		return tripEntity;

	}

	public HResourceRelation getImageRelation() {
		HResourceRelation reslation = new HResourceRelation();
		if (this.image != null) {
			reslation.setPath(image.path);
			reslation.setResouceId(image.resouceId);
			reslation.setId(image.relationId);
			
		}

		return reslation;
	}

	class Meal {
		private boolean breakfast;
		private boolean lunch;
		private boolean dinner;
		private boolean nothing;
		private boolean aircraft;

		public boolean isBreakfast() {
			return breakfast;
		}

		public void setBreakfast(boolean breakfast) {
			this.breakfast = breakfast;
		}

		public boolean isLunch() {
			return lunch;
		}

		public void setLunch(boolean lunch) {
			this.lunch = lunch;
		}

		public boolean isDinner() {
			return dinner;
		}

		public void setDinner(boolean dinner) {
			this.dinner = dinner;
		}

		public boolean isNothing() {
			return nothing;
		}

		public void setNothing(boolean nothing) {
			this.nothing = nothing;
		}

		public boolean isAircraft() {
			return aircraft;
		}

		public void setAircraft(boolean aircraft) {
			this.aircraft = aircraft;
		}

	}

}
